package com.xingxuecn.limit.common.model.vo;

import com.xingxuecn.limit.common.model.dto.Role;

import org.apache.commons.lang3.builder.MultilineRecursiveToStringStyle;
import org.apache.commons.lang3.builder.ToStringBuilder;

/**
 * @author Kris at 2018/9/14 14:36
 */
public class RoleUserNode extends Role {
    private Boolean checked;

    public RoleUserNode(Boolean checked) {
        this.checked = checked;
    }

    public RoleUserNode() {
    }

    public RoleUserNode(Role role){
        super(role.getId(),role.getName(),role.getState(),role.getState());
    }

    public Boolean getChecked() {
        return checked;
    }

    public void setChecked(Boolean checked) {
        this.checked = checked;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, new MultilineRecursiveToStringStyle())
                .append("checked", checked)
                .toString() + "extends from\t" + super.toString();
    }
}
